<template>
    <div>
        <MenuAddEditDialog ref="dialog"></MenuAddEditDialog>
        <ElButton @click="openDialog(0,undefined)">open new</ElButton>
        <ElButton @click="openDialog(undefined,91)">edit</ElButton>
    </div>
</template>
<script setup lang='ts'>
import {TypeMenuFormI,TypeMenuQueryI} from '@/api/menu/menu_types'
import MenuAddEditDialog from './menu_add_edit_dialog.vue'
import {ref} from 'vue'

    ////#region defineXxx
    //defineOptions({
        //name:
    //});

    //const props=defineProps({
        //propA:{
            //type:String,
            //required:true
        //},
        //propB:{
            //type:Number,
            //default:1
        //},
        //propC:{
            //type:String as PropType<MyType>,
            //required:true
        //},
    //});

    //const emit = defineEmits<{
        //event1:[para1:number,para2:string],
        //event2:[para1:number,para2:string],
    //}>();
    ////#endregion
    const queryParamsInit:TypeMenuQueryI={
        keywords:undefined
    }
const queryParamsRef = ref<TypeMenuQueryI>(Object.assign({},queryParamsInit));  
const dialog=ref();


function openDialog(parentId?: number, menuId?: number){
    dialog.value.openDialog(parentId,menuId)
}
    
</script>
<style lang='scss' scoped>
    
</style>